home *** CD-ROM | disk | FTP | other *** search
-
- C shell quick reference
-
- This file is a quick reference to important information about csh.
-
- History modifications:
- Format of history specification:
- <event>[:<position>][:<action>]
-
- <event> Can be one of the following:
- !! Previous command line. Equivalent to !-1.
- !-N Command line N lines ago.
- !N Command line N.
- !C Command line starting with characters C.
- !?C? Command line containing characters C.
- <position> Can be one of the following:
- 0 Command word.
- N Word position N.
- N-M Word positions N through M.
- ^ Word position 1.
- $ Last word position in command.
- % Matches the word that the <event> found when
- using !?C? form used.
- -N Word positions 0 through N.
- * Word positions 1 through $.
- N* Word positions N through $.
- N- Word positions N through $-1.
- <action> Can be one of the following:
- h Remove trailing pathname component, leaving
- the head.
- r Remove extension.
- e Remove all but the extension. Also removes
- the period.
- s/N/M/ Substitute M for N.
- t Remove all leading pathname components leaving
- just the file name and extension.
- & Repeate the previous substitution.
- g Apply change globally.
- p Print the new command without executing it.
- q Quote the substituted words, preventing
- additional substitutions.
- x Like q but break into words at blanks.
-
- Variable Substitutions:
- Can be modified with : operator:
- $name
- ${name}
-
- $name[word]
- ${name[word]}
-
- $#name
- ${#name}
-
- $0
-
- $N
- ${N}
-
- $*
-
- Cannot be modified with : operator:
- $?name
- ${?name}
-
- $?0
-
- $$
-
- $<
-
- Input/Output Redirection:
- < name Change stdin to file/device 'name'.
- << word Provide shell input up to line which is identical to
- 'word' as stdin.
- > name Change stdout to file/device 'name'.
- >! name Change stdout to file/device 'name' and override
- 'noclobber' variable.
- >& name Change stderr and stdout to file/device 'name'.
- >&! name Change stderr and stdout to file/device 'name' and
- override 'nclobber' variable.
- >> name Change stdout to append to file/device 'name'.
- >>! name Change stdout to append to file/device 'name' and
- override 'noclobber' variable.
- >>& name Change stderr and stdout to append to file/device
- 'name'.
- >>&! name Change stderr and stdout to append to file/device
- 'name' and override 'noclobber' variable.
-
- File Enquiries:
- r read access
- w write access
- x execute access
- e existence
- o ownership
- z zero size
- f plain file
- d directory
- l symbolic link
- c character special file
- b block special file
- p named pipe (fifo)
- u set-user-ID bit is set
- g set-group-ID bit is set
- k sticky bit is set
- s size is greater than 0
- t open file descriptor for terminal device
-
- Command line parameters to csh:
- -b All further arguments on the command line are to be
- ignored. Further options are passed to a shell script
- run by csh.
- -c The rest of the arguments are a command to be run.
- -e Exit if any command terminates abnormally.
- -f Do not read any commands from .cshrc.
- -i Interactive even if stdin is not a terminal.
- -n Parse commands but don't execute them.
- -s Commands are read from stdin.
- -t A single line of input is read and executed.
- -v Set the 'verbose' variable.
- -x Set the 'echo' variable.
- -V Set the 'verbose' variable before reading .cshrc.
- -X Set the 'echo' variable before reading .cshrc.
-